<?php
/**
 * Created by PhpStorm.
 * User: mac
 * Date: 2018/6/21
 * Time: 09:34
 */

namespace app\common\model;


use think\Model;

class Ads extends Model
{
    //获取首页轮播图广告
    public function getads(){
        $where = array(
            'type_id' => 1,
            'status' => 1,
        );
        $ads = $this->where($where)->field("id,pic,url")->order("sort desc")->select();
        return $ads;
    }
}